package com.epam.productxslt.validation.rules;

import com.epam.productxslt.util.ResourceManager;
import com.epam.productxslt.validation.ValidationResult;

public class PriceRule extends MaskRule {

	public PriceRule() {
		super(ResourceManager.getProperty(ResourceManager.PRICE_PATTERN));
	}
	
	public ValidationResult validate(String value) {
		ValidationResult validationResult = super.validate(value);
		validationResult.setMessage(ResourceManager.getProperty(ResourceManager.INCORRECT_PRICE_MESSAGE));
		return validationResult;
	}

}
